package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author huanglu
 * @since 2019-01-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SmkMaint extends Model<SmkMaint> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "maint_id", type = IdType.AUTO)
    private Long maintId;

    private Long deptId;

    private String maintAddr;

    private String maintName;

    private String managerMobile;

    private String managerName;

    private String officePhone;

    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate;

    private String createBy;

       /**
	 * 部门名称
	 */
    @TableField(exist = false)
    private String depName;
    
        /**
	 * 部门级联id
	 */
    @TableField(exist = false)
	private String cascader;


    @Override
    protected Serializable pkVal() {
        return this.maintId;
    }

    @Override
    public String toString() {
        return "SmkMaint{" +
        "maintId=" + maintId +
        ", deptId=" + deptId +
        ", maintAddr=" + maintAddr +
        ", maintName=" + maintName +
        ", managerMobile=" + managerMobile +
        ", managerName=" + managerName +
        ", officePhone=" + officePhone +
        ", remark=" + remark +
        ", createDate=" + createDate +
        ", createBy=" + createBy +
        "}";
    }
}
